home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Add-Ons / 4D / ComboBox 1.1.1 / src / ComboBox.h < prev    next >
Text File  |  1996-02-23  |  4KB  |  130 lines

  1. //---------------------------------------------------------------------------------------
  2. //
  3. //    ComboBox.h -- Header for ComboBox external area data structures
  4. //
  5. //    Copyright ©1995-1996, Pensacola Christian College
  6. //
  7. //    ======================================================================
  8. //    Change History
  9. //    ======================================================================
  10. //
  11. //    1.0            08/  /95        Steve Dwire
  12. //                                            Initial release
  13. //
  14. //    1.1            11/28/95        Steve Dwire
  15. //                                            Added kCB_GetFontNum
  16. //
  17. //---------------------------------------------------------------------------------------
  18.  
  19. #ifndef __COMBOBOX_H__
  20. #define __COMBOBOX_H__ 1
  21.  
  22. #ifndef __EXTERNAL4D__
  23. #include <Ext4D.h>
  24. #endif
  25. #include "ExtRoutines.h"
  26.  
  27. #define kScrollBarWidth 15
  28. #define kBaseResID            16666
  29.  
  30. typedef enum
  31. {
  32.     kOutput    = 0,
  33.     kInput,
  34.     kDesign
  35. } LytType;
  36.  
  37. typedef enum
  38. {
  39.     kOutside = 0,
  40.     kInText,
  41.     kInPICT,
  42.     kInList
  43. } MouseLocType;
  44.  
  45. typedef struct tagAreaStr
  46. {
  47.     Boolean                isWindow;
  48.     Boolean             isPrinting;
  49.     LytType                MyLytType;
  50.     GrafPtr                AreaGrafPort;
  51.     Rect                    AreaRect;
  52.     Rect                    PICTRect;
  53.     Rect                    TextRect;
  54.     Rect                    ListRect;
  55.     TEHandle            TextTEHnd;
  56.     XHANDLE                SearchTextHandle;
  57.     SWORD                    SearchTextLength, SearchTextSize;
  58.     ListHandle        ListHnd;
  59.     UBYTE                    ListArrName[12];
  60.     SWORD                    ArrElems;
  61.     ULONG                    ActivateTick; // TickCount when activated
  62.     ULONG                    DeactivateTick; // TickCount when deactivated;
  63.     ULONG                    KeyTick; // TickCount when last key pressed
  64.     SWORD                    CPICTResUp,CPICTResDn,CPICTResDis,MPICTResUp,MPICTResDn,MPICTResDis;
  65.     SWORD                    TextFont,TextSize,TextStyle,TextFGColor,TextBGColor;
  66.     SWORD                    ListFont,ListSize,ListStyle,ListFGColor,ListBGColor;
  67.     SWORD                    ListRows,ListPos,ScrollPos,PixGap,TopGap,LeftGap,RightGap,PixLead;
  68.     struct 
  69.     {    
  70.         Boolean            CanFind:1; // should we select the item in the list as the user types?
  71.         Boolean            CanFill:1; // should we fill in the remaining portion of the chosen item?
  72.         Boolean            CanList:1; // should we open the list box when the user types?
  73.         Boolean            CanEdit:1; // can the user enter something that's not in the list?
  74.         Boolean            ListOnActivate:1; // should we open the list box when the area is selected?
  75.         Boolean            ListOnKeystroke:1; // should we open the list box when the user presses a key?
  76.         Boolean            Visible:1; // is the area currently visible?
  77.         Boolean            Active:1; // is the area selected?
  78.         Boolean            Modified:1; // has the user modified this area?
  79.         Boolean            Enabled:1; // can this area be selected?
  80.         Boolean            Open:1; //  is the list box currently open?
  81.         Boolean            InterprocArr:1; // is the array an interprocess array?
  82.         Boolean            ListDirty:1; // is the main process currently updating the list array?
  83.     }                            Flags;
  84. } AreaStr, *AreaPtr, **AreaHnd;
  85.  
  86. typedef struct tagPackStr
  87. {
  88.     SWORD            DefCPICTResUp,DefCPICTResDn,DefCPICTResDis;
  89.     SWORD            DefMPICTResUp,DefMPICTResDn,DefMPICTResDis;
  90.     SWORD            DefTextFont,DefTextSize,DefTextStyle,DefTextFGColor,DefTextBGColor;
  91.     SWORD            DefListFont,DefListSize,DefListStyle,DefListFGColor,DefListBGColor;
  92.     SWORD            DefListRows,DefPixGap,DefTopGap,DefLeftGap,DefRightGap,DefPixLead;
  93.     AreaHnd        CurrAreaHnd; // so Ext. Process knows which area to work on.
  94.     WindowPtr    ListWindow; // areas call LNew with this window that the ext. process creates.
  95.     SLONG            ListProcID; // Process ID of the list process.
  96.     struct 
  97.     {    
  98.         Boolean    CanFind:1;
  99.         Boolean    CanFill:1;
  100.         Boolean    CanList:1;
  101.         Boolean    CanEdit:1;
  102.         Boolean ListOnActivate:1;
  103.         Boolean ListOnKeystroke:1;
  104.     }                    DefFlags;
  105. } PackStr, *PackPtr, **PackHnd;
  106.  
  107. enum
  108. {
  109.     k_MyAreaProc    = 1,
  110.     //•Include one enumeration for each routine in your package
  111.   kCB_SetDefTxtFnt,kCB_SetDefTxtCol,
  112.   kCB_SetDefLstFnt,kCB_SetDefLstCol,
  113.   kCB_SetDefLstRws,
  114.   kCB_SetDefPopPic,kCB_SetDefGap,kCB_SetDefLead,
  115.   kCB_SetDefFlags,
  116.   kCB_SetTxtFnt,kCB_SetTxtCol,
  117.   kCB_SetLstFnt,kCB_SetLstCol,
  118.   kCB_SetLstRws,kCB_GetLstRws,
  119.   kCB_SetPopPic,kCB_SetGap,kCB_SetLead,
  120.   kCB_SetFlags,
  121.   kCB_FillLst,kCB_UpdateLst,
  122.   kCB_SetLstPos,kCB_GetLstPos,
  123.   kCB_SetTxt,kCB_GetTxt,
  124.   kCB_SetModified,kCB_GetModified,
  125.     kCB_SetEnabled,kCB_GetEnabled,
  126.     kCB_SetHilite,kCB_GetHilite,
  127.     kCB_GetFontNum
  128. };
  129.  
  130. #endif